import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import com.aliyuncs.exceptions.ClientException;
import com.gexin.rp.sdk.base.IPushResult;
import com.gexin.rp.sdk.base.impl.AppMessage;
import com.gexin.rp.sdk.http.IGtPush;
import com.gexin.rp.sdk.template.LinkTemplate;
import com.han.hotelplat.comm.utils.MsgHelp;

public class MSGTest {

    //定义常量, appId、appKey、masterSecret 采用本文档 "第二步 获取访问凭证 "中获得的应用配置
    private static String appId = "MBeeQ3ow9A7dkmG5U9T4b6";
    private static String appKey = "kjMmUUCAtX5IxbyauwyeJ";
    private static String masterSecret = "Zg3xvMxqYW9iexVjOp3Tu5";
    private static String url = "http://sdk.open.api.igexin.com/apiex.htm";

    public static void main(String[] args) throws IOException {

        /*IGtPush push = new IGtPush(url, appKey, masterSecret);

        // 定义"点击链接打开通知模板"，并设置标题、内容、链接
        LinkTemplate template = new LinkTemplate();
        template.setAppId(appId);
        template.setAppkey(appKey);
        template.setTitle("测试");
        template.setText("王八蛋");
        template.setUrl("http://getui.com");

        template.setIsRing(true);
        template.setIsVibrate(true);
        template.setIsClearable(true);
        
        List<String> appIds = new ArrayList<String>();
        appIds.add(appId);

        // 定义"AppMessage"类型消息对象，设置消息内容模板、发送的目标App列表、是否支持离线发送、以及离线消息有效期(单位毫秒)
        AppMessage message = new AppMessage();
        message.setData(template);
        message.setAppIdList(appIds);
        message.setOffline(true);
        message.setOfflineExpireTime(1000 * 600);

        IPushResult ret = push.pushMessageToApp(message);
        System.out.println(ret.getResponse().toString());*/
    	
    	try {
    		//MsgHelp.sendCheckCode("13760745357", "2839", 1);
    		//MsgHelp.sendEmExitTask("13760745357", "程小寒", "胡威", "T2018040819287");
			//MsgHelp.sendOrderReceive("13760745357", "程小寒", "T2018040819287");
    		//MsgHelp.sendTimeoutTask("13760745357", "程小寒", "T2018040819287");
    		//MsgHelp.sendAuthHotelNoPass("13760745357", "程小寒");
    		//MsgHelp.sendAuthHotelPass("13760745357", "程小寒");
    		//MsgHelp.sendAuthUserStop("13760745357", "程小寒", 2);
    		MsgHelp.sendHotelCancerTask("13760745357", "程小寒", "T2018040819287");
    		//MsgHelp.sendHotelFinishTask("13760745357", "程小寒", "T2018040819287", 200.3847f);
    		//MsgHelp.sendHotelStopTask("13760745357", "程小寒", "T2018040819287", 200.0f);
    		//MsgHelp.sendAuthEmUserNoPass("13760745357", "程小寒");
    		//MsgHelp.sendAuthEmUserPass("13760745357", "程小寒");
    		//MsgHelp.sendAuthUserStop("13760745357", "程小寒", 1);
    		//MsgHelp.sendAddEmTask("13760745357", "程小寒", "ali大酒店","T2018040819287", "2018-04-25", "2018-04-28");
    		//MsgHelp.sendCashNoPass("13760745357", "程小寒");
    	} catch (ClientException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    }
}